<extend name="Base/common" />
<block name="body">
<div class="page-container">
  <div class="cl pd-5 bg-1 bk-gray mt-20" style="padding:20px;">
    <div>
      <p>账户：{$account_info['body']['customerCode']}</p>
      <p>账户类型：{$account_info['body']['accountType']}</p>
      <p>币种：人民币</p>
      <p>账户余额：
      <span class="c-red">{$account_info['body']['balance']}</span> 
      <a href="{:U('user/order/withdraw_add')}" class="btn btn-success" style="margin-left:20px;">申请转账</a>
      </p>
    </div>
  </div>
  <form action="#" method="post" class="mt-20">
    <div class="text-c"> 日期范围：
      <input type="text" onfocus="WdatePicker()" id="logmin" name="start_time" class="input-text Wdate" style="width:120px;" value="{$start_time}">
      -
      <input type="text" onfocus="WdatePicker()" id="logmax" name="end_time" class="input-text Wdate" style="width:120px;" value="{$end_time}">
      <button name="" id="" class="btn btn-success" type="submit">查询</button>
    </div>
  </form>
  <table class="table table-border table-bordered table-bg table-sort">
    <thead>
      <tr>
        <th>订单创建时间</th>
        <th>提现金额</th>
        <th>银行</th>
        <th>银行卡</th>
        <th>状态</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody>
      <foreach name="withdraw_list" item="item">
      <tr>
        <td>{$item['create_time']|date="Y-m-d H:i:s", ###}</td>
        <td>{$item['transferAmount']}</td>
        <td>
        <foreach name="bank_list" item="bank">
          <if condition="$bank['code'] eq $item['bankCode']">
            {$bank['name']}
          </if>
        </foreach>
        </td>
        <td>{$item['bankCard']}</td>
        <if condition="$item['status'] eq 0">
        <td>处理中</td>
        <elseif condition="$item['status'] eq 1"/>
        <td>已转入商户账户</td>
        </if>
        <td>
          <if condition="$item['status'] eq 1">
          <a class="maincolor" href="{:U('/user/order/withdraw_do', array('id' => $item['id']))}">提现</a>
          </if>
        </td>
      </tr>
      </foreach>
    </tbody>
  </table>
  <div>
    <div id="pager"></div>
  </div>
</div>
<script>
$('.table-sort').dataTable({
  "bStateSave": true,//状态保存
  'ordering':false,
});
</script>
</block>
